package com.ben.service;

import java.util.ArrayList;
import java.util.List;

import com.ben.dao.MessageDAO;

/**
 * 维护 
 */
public class MaintainService {
	public void deleteOne(String id){
		if (id != null && !"".equals(id.trim())) {
			MessageDAO messageDAO = new MessageDAO();
			messageDAO.deleteOne(Integer.valueOf(id));
		}
	}
	
	public void deleteBatch(String[] ids){
			List<Integer> idsList = new ArrayList<Integer>();
			for(String id:ids){
				idsList.add(Integer.valueOf(id));
			}
			MessageDAO messageDAO = new MessageDAO();
			messageDAO.deleteBatch(idsList);
	}
}
